<include file="Public/header" title="添加房源分间" />

<div id="page-wrapper">    
    <div class="row">
        <div class="col-md-6">
            <!-- <form action="{:U('page/index')}" method="post">
                <div class="form-group input-group">
                    <input type="text" class="form-control" name="key" placeholder="输入单页标题或者别名关键词搜索">
                    <span class="input-group-btn">
                      <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
                    </span>
                </div>
            </form> -->
        </div>
    </div>
    <table class="table table-hover table-striped">
        <thead>
            <tr>
                <th>编号</th>
                <th>房源ID</th>
                <th>房号</th>
                <th>面积</th>
                <th>价格</th>
                <th>人数</th>
                <th>入住情况</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <foreach name="model" item="v">
            <tr>
                <td>{$v["id"]}</td>
                <td>{$v["rel_id"]}</td>
                <td>{$v["fanghao"]}</td>
                <td>{$v["mianji"]}㎡</td>
                <td>{$v["jiage"]}</td>
                <td>{$v["renshu"]}</td>
                <td><if condition="$v['state'] eq 1">已入住<else/>未入住</if></td>
                <td><if condition="$v['flag'] eq 1">已上架<else/>已下架</if></td>
                <td>
                    <a class="edit" href="{:U('Fenrent/update',array('id'=>$v['id']))}">编辑</a>
                    <a class="del" href="{:U('Fenrent/delete',array('id'=>$v['id']))}">下架</a>
                </td>
            </tr>
            </foreach>
        </tbody>
    </table>
    {$page}
</div>
<include file="Public/footer" />